<?php
$aksi="module/mahasiswa/aksi.php";
?>
<h2>Cetak Kelulusan Non Skripsi</h2>
<?php
 //onSubmit='return validasi(this)'
 echo "
 <form name=mahasiswa method=POST  action='../staf/module/cetak_laporan/cetak_non_skripsi.php'  enctype='multipart/form-data'>"; ?>
<table width="490" >
  <tr >
    <th width="20">No</th>
    <th width="144">npk</th>
    <th width="150">Nama</th>
    <th width="150">dosen</th>
    <th width="156">Aksi</th>
  </tr>
  <?php 
 
 	$p      = new Paging;
    $batas  = 5;
    $posisi = $p->cariPosisi($batas);
 
 		$sql="SELECT
				kelulusan_non_skripsi.id_nilai,
				kelulusan_non_skripsi.no_klsns,
				kelulusan_non_skripsi.nip,
				dosen.nama AS dosen,
				nilai.ipk_terahir,
				nilai.npk,
				mahasiswa.nama
				FROM
				kelulusan_non_skripsi
				Inner Join dosen ON kelulusan_non_skripsi.nip = dosen.nip
				Inner Join nilai ON kelulusan_non_skripsi.id_nilai = nilai.id_nilai
				Inner Join mahasiswa ON nilai.npk = mahasiswa.npk ORDER BY npk DESC  LIMIT $posisi,$batas
				";
 		$query=mysql_query($sql);
	$no=1 + $posisi;
		while ($data=mysql_fetch_array($query)){
  ?>
  <tr class="<?php if ($no %2 == 0):echo "zebra";else:echo "zebra2"; endif;?>" align="center">
    <td><?php echo $no; ?></td>
    <td><?php echo $data['npk']; ?></td>
    <td><?php echo $data['nama']; ?></td>
     <td><?php echo $data['dosen']; ?></td>
    <td align="center"><input type=hidden value=<?php echo $data['npk']; ?> name="id"><input type=submit value=Cetak>
     </td>
  </tr>
  <?php 
 $no++;
 } ?>
</table>
</form>
<center>
<?php 

    $jmldata = mysql_num_rows(mysql_query("SELECT * FROM proposal_skripsi"));
    $jmlhalaman  = $p->jumlahHalaman($jmldata, $batas);
    $linkHalaman = $p->navHalaman($_GET[halaman], $jmlhalaman);

    echo "<div id=paging>$linkHalaman</div><br>";
	
	?>